package com.falcon.controller.toolkit;

import com.falcon.service.IGenApiService;
import com.falcon.mvc.base.IBaseController;
import com.falcon.mvc.domain.BaseResponse;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/toolkit/api")
@Tag(name = "6.导入Api接口", description = "导入项目中所有Api")
public class GenApiController implements IBaseController {

    @Autowired
    private IGenApiService genApiService;

    @Operation(summary = "同步")
    @PostMapping("/sync")
    public BaseResponse<Boolean> sync() {

        this.genApiService.sync();

        return BaseResponse.success(true);
    }


}

